# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
pkgname=station
pkgver=4.0.0
pkgrel=0
pkgdesc="Convergent terminal emulator"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://invent.kde.org/maui/maui-station"
license="GPL-3.0-or-later"
depends="
	qmltermwidget
	mauikit-terminal
	"
makedepends="
	extra-cmake-modules
	kcoreaddons-dev
	ki18n-dev
	mauikit-dev
	mauikit-filebrowsing-dev
	mauikit-terminal-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/maui/maui-station.git"
source="https://download.kde.org/stable/maui/station/$pkgver/maui-station-$pkgver.tar.xz"
options="!check" # No tests
builddir="$srcdir/maui-$pkgname-$pkgver"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
aa254704db059a2f44bcd854bd4bce131f25d95e982a1f89fcf7f9dc27815026c857e621ba07f2c508f1958deb92e30c733f62d0c0b2b8423bf522362d0649ee  maui-station-4.0.0.tar.xz
"
